package com.bangdream.michelia.entity.exam;

import android.os.Parcel;
import android.os.Parcelable;

import com.alibaba.fastjson.JSON;

/**
 * @date on 2018/8/19 16:34
 * @email 909732184@qq.com
 * 试题 题目
 */
public class SubjectBean implements Parcelable{

    /**
     * id : 0a40025d308942258e481ed6184c96ac
     * userId : 1
     * delFlag : 0
     * pageNo : 1
     * pageSize : 100
     * orgId : a
     * appId : byl
     * questionId : eada571402154e0f970a72b64d7e6fff
     * isCorrect : 0
     * score : 0
     * mark : 2
     * testDate : 0
     * sort : 1
     * finishFlg : 0
     * questionTitle : 填空题--demo
     * questionType : write
     * questionTypeLabel : 填空题
     * avgAccuracy : 0
     * maxAccuracy : 0
     * avgTime : 0
     * maxTime : 0
     * avgCntTest : 0
     * maxCntTest : 0
     * avgScore : 0
     * maxScore : 0
     */

    private String id;
    private String userId;
    private String delFlag;
    private int pageNo;
    private int pageSize;
    private String orgId;
    private String appId;
    private String questionId;
    private String isCorrect;
    private String score;
    private String mark;
    private int testDate;
    private int sort;
    private int finishFlg;
    private String questionTitle;
    private String questionType;
    private String questionTypeLabel;
    private int avgAccuracy;
    private int maxAccuracy;
    private int avgTime;
    private int maxTime;
    private int avgCntTest;
    private int maxCntTest;
    private int avgScore;
    private int maxScore;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getQuestionId() {
        return questionId;
    }

    public void setQuestionId(String questionId) {
        this.questionId = questionId;
    }

    public String getIsCorrect() {
        return isCorrect;
    }

    public void setIsCorrect(String isCorrect) {
        this.isCorrect = isCorrect;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getMark() {
        return mark;
    }

    public void setMark(String mark) {
        this.mark = mark;
    }

    public int getTestDate() {
        return testDate;
    }

    public void setTestDate(int testDate) {
        this.testDate = testDate;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public int getFinishFlg() {
        return finishFlg;
    }

    public void setFinishFlg(int finishFlg) {
        this.finishFlg = finishFlg;
    }

    public String getQuestionTitle() {
        return questionTitle;
    }

    public void setQuestionTitle(String questionTitle) {
        this.questionTitle = questionTitle;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public String getQuestionTypeLabel() {
        return questionTypeLabel;
    }

    public void setQuestionTypeLabel(String questionTypeLabel) {
        this.questionTypeLabel = questionTypeLabel;
    }

    public int getAvgAccuracy() {
        return avgAccuracy;
    }

    public void setAvgAccuracy(int avgAccuracy) {
        this.avgAccuracy = avgAccuracy;
    }

    public int getMaxAccuracy() {
        return maxAccuracy;
    }

    public void setMaxAccuracy(int maxAccuracy) {
        this.maxAccuracy = maxAccuracy;
    }

    public int getAvgTime() {
        return avgTime;
    }

    public void setAvgTime(int avgTime) {
        this.avgTime = avgTime;
    }

    public int getMaxTime() {
        return maxTime;
    }

    public void setMaxTime(int maxTime) {
        this.maxTime = maxTime;
    }

    public int getAvgCntTest() {
        return avgCntTest;
    }

    public void setAvgCntTest(int avgCntTest) {
        this.avgCntTest = avgCntTest;
    }

    public int getMaxCntTest() {
        return maxCntTest;
    }

    public void setMaxCntTest(int maxCntTest) {
        this.maxCntTest = maxCntTest;
    }

    public int getAvgScore() {
        return avgScore;
    }

    public void setAvgScore(int avgScore) {
        this.avgScore = avgScore;
    }

    public int getMaxScore() {
        return maxScore;
    }

    public void setMaxScore(int maxScore) {
        this.maxScore = maxScore;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.userId);
        dest.writeString(this.delFlag);
        dest.writeInt(this.pageNo);
        dest.writeInt(this.pageSize);
        dest.writeString(this.orgId);
        dest.writeString(this.appId);
        dest.writeString(this.questionId);
        dest.writeString(this.isCorrect);
        dest.writeString(this.score);
        dest.writeString(this.mark);
        dest.writeInt(this.testDate);
        dest.writeInt(this.sort);
        dest.writeInt(this.finishFlg);
        dest.writeString(this.questionTitle);
        dest.writeString(this.questionType);
        dest.writeString(this.questionTypeLabel);
        dest.writeInt(this.avgAccuracy);
        dest.writeInt(this.maxAccuracy);
        dest.writeInt(this.avgTime);
        dest.writeInt(this.maxTime);
        dest.writeInt(this.avgCntTest);
        dest.writeInt(this.maxCntTest);
        dest.writeInt(this.avgScore);
        dest.writeInt(this.maxScore);
    }

    public SubjectBean() {
    }

    protected SubjectBean(Parcel in) {
        this.id = in.readString();
        this.userId = in.readString();
        this.delFlag = in.readString();
        this.pageNo = in.readInt();
        this.pageSize = in.readInt();
        this.orgId = in.readString();
        this.appId = in.readString();
        this.questionId = in.readString();
        this.isCorrect = in.readString();
        this.score = in.readString();
        this.mark = in.readString();
        this.testDate = in.readInt();
        this.sort = in.readInt();
        this.finishFlg = in.readInt();
        this.questionTitle = in.readString();
        this.questionType = in.readString();
        this.questionTypeLabel = in.readString();
        this.avgAccuracy = in.readInt();
        this.maxAccuracy = in.readInt();
        this.avgTime = in.readInt();
        this.maxTime = in.readInt();
        this.avgCntTest = in.readInt();
        this.maxCntTest = in.readInt();
        this.avgScore = in.readInt();
        this.maxScore = in.readInt();
    }

    public static final Creator<SubjectBean> CREATOR = new Creator<SubjectBean>() {
        @Override
        public SubjectBean createFromParcel(Parcel source) {
            return new SubjectBean(source);
        }

        @Override
        public SubjectBean[] newArray(int size) {
            return new SubjectBean[size];
        }
    };
}
